/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package speedymarket_fusion;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

/**
 *
 * @author tordeepweb
 */
@DatabaseTable(tableName="categorie")
public class Categorie {
    public static final String CATEGORIE_PARENT_FIELD_NAME = "code_categorie_parente";
    public static final String IMAGE_FIELD_NAME = "code_image";

    @DatabaseField(id=true)
    private int code_categorie;
    @DatabaseField
    private String libelle_categorie;
    @DatabaseField (foreign = true, columnName = CATEGORIE_PARENT_FIELD_NAME)
    private Categorie code_categorie_parente;
    @DatabaseField(foreign = true, columnName = IMAGE_FIELD_NAME)
    private Image code_image;

    public Categorie() {
    }
    
    

    public Categorie(int un_code_categorie, String un_libelle_categorie, Categorie un_code_categorie_parente, Image un_code_image) {
        code_categorie = un_code_categorie;
        libelle_categorie = un_libelle_categorie;
        code_categorie_parente = un_code_categorie_parente;
        code_image = un_code_image;
    }

    public int getCode_categorie() {
        return code_categorie;
    }

    public void setCode_categorie(int un_code_categorie) {
        code_categorie = un_code_categorie;
    }

    public String getLibelle_categorie() {
        return libelle_categorie;
    }

    public void setLibelle_categorie(String un_libelle_categorie) {
        libelle_categorie = un_libelle_categorie;
    }

    public Categorie getCode_categorie_parente() {
        return code_categorie_parente;
    }

    public void setCode_categorie_parente(Categorie un_code_categorie_parente) {
        code_categorie_parente = un_code_categorie_parente;
    }

    public Image getCode_image() {
        return code_image;
    }

    public void setCode_image(Image un_code_image) {
        code_image = un_code_image;
    }

}
